home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)U
/
(A)U1.ADF
/
CLI Information
/
CLI Commands
< prev
next >
Wrap
Text File
|
1986-08-01
|
13KB
|
657 lines
AMIGA DOS & CLI Commands
Original version by Roy Ready, additions and corrections by John Foust,
for AMICUS Amiga Computer Users, November 1985.
The following article is meant as a quick reference card for those users
without an AmigaDOS Manual.
The AmigaDOS environment has a sort of built-in help. If you remember the
command but forget the syntax for the arguments you can ask AmigaDOS to
show you. The syntax for this kind of help is :
< Command > < space > ? < return >
AmigaDOS will respond by showing you the argument template. This template
has three qualifiers which are preceded by slashes as follows:
/A - this argument must be present and may NOT be omitted.
/K - the argument must use this keyword
/S - this argument is used as a switch
AmigaDOS Commands Quick Reference Card
User's Commands
File Utilities
; comment character
Format : [<command>] ; [<comment>]
Template : "command" ; "comment"
Examples :
copy DF0:c/list to ram: ; Copy list program to RAM drive
list DF1: ; display directory of DF1: drive
Anything after a ';' on a CLI line is ignored.
< > Direct standard input and output, respectively
Format : <command> [ < ] [ > ] [<arg>]
Template : "command" > "TO" < "FROM" "args"
Examples :
DATE > date-file
sends the output of the DATE command to file 'date-file'
SOMEPROG < input-file
directs the data in file 'input-file' to the program
named SOMEPROG.
Note that the usual standard input is the keyboard, and the
standard output is the screen, unless you re-direct input
and output with these commands.
COPY copies one file to another or
copies all the files from one directory to another.
Format : COPY [[FROM] <name> ] [TO <name> ] [ALL] [QUIET]
Template : COPY "FROM,TO/A,ALL/S,QUIET/S"
Examples :
COPY DF0: TO DF1: ALL QUIET
copies all files in all directories from DF0: to DF1:.
New sub-directories are created on DF1:
COPY print-file TO PRT:
copies a file to the printer device
DELETE deletes up to 10 files or directories.
Format : DELETE <name> [<name>] [ALL] [QQUIET]
Template : DELETE ",,,,,,,,,,ALL/S,Q=QUIET/S
Examples :
DELETE out-dated-file
DELETE temps/file1 temps/file1
DELETE df1: ALL QUIET
deletes all files in all directories on DF1:, without
telling which files were deleted
DIR shows filenames in a directory.
Format : DIR [<name>] [OPT AIAI]
Template : DIR "DIR,OPT/K"
Examples :
DIR
lists files in current directory
DIR DF1: OPT A
lists files in all sub-directories below current directory
ED enters a screen editor for text files.
Format : ED [FROM] <name> [SIZE <n>]
Template : ED "FROM/A,SIZE"
Examples :
ED temp/ed-file
ED large-file SIZE 55000
EDIT enters a line editor.
Format : EDIT [FROM] <name> [[TO] <name> ] [WITH <name> ]
[VER <name>] [OPT <option>]
Template : EDIT "FROM/A,TO,WITH/K,VER/K,OPT/K"
Examples :
EDIT ed-file WITH edits VER nil:
EDIT orig-file TO new-file
FILENOTE attaches a note with a maximum of 80 characters
to a specified file.
Format : FILENOTE [FILE] <file> COMMENT <string>
Template : FILENOTE "FILE/A,COMMENT/K"
Examples :
FILENOTE my-picture COMMENT "drawn in November"
FILENOTE src-file COMMENT "source for screen"
JOIN concatenates up to 15 files to form a new file.
Format : JOIN <name> <name> [<name>] AS <name>
Template : JOIN ",,,,,,,,,,,,,,AS/A/K"
Examples :
JOIN src-file1 src-file2 AS all-src
JOIN text data results AS experiment
LIST examines and displays detailed information
about a file or directory.
Format : LIST [DIR] <dir> [PPAT <pat>] [KEYS] [DATES] [NODATES]
[TO <name>] [S <string>] [SINCE <date>] [UPTO <date>]
[QUICK]
Template : LIST "DIR,P=PAT/K,KEYS/S,DATES/S,NODATES/S,TO/K,
S/K,SINCE/K,UPTO/K,QUICK/S"
Examples :
LIST DF1:
LIST P ??
list info about files matching pattern ?? (that is, all
files with two character names)
LIST :l S handler
list info about files in directory 'l' on current disk,
searching files there for string 'handler'.
MAKEDIR creates a directory with a specified name.
Format : MAKEDIR <dir>
Template : MAKEDIR "/A"
Examples :
MAKEDIR DF0:test
MAKEDIR RAM:temp/files
PROTECT sets a file's protection status.
Format : PROTECT [FILE] <name> [FLAGS <status>]
Template : PROTECT "FILE,FLAGS/K"
Examples :
PROTECT file1 rwd
PROTECT temp/file FLAGS r
RENAME renames a file or directory.
Format : RENAME [FROM] <name> [TO AS] <name>
Template : RENAME "FROM/A,TO=AS/A"
Examples :
RENAME OLD-NAME NEW-NAME
RENAME RAM:C/FILE1 NEW-FILE
SEARCH looks for a specified text string
in all the files of a directory.
Format : SEARCH [FROM] <name><pattern> [SEARCH] <string> [ALL]
Template : SEARCH "FROM,SEARCH/A,ALL/S"
Examples :
SEARCH DF0: my-name
SEARCH DF1: source ALL
search all files on DF1: for the string "source"
SORT sorts files.
Format : SORT [FROM] <name> [[TO] <name>] [COLSTART <n>]
Template : SORT "FROM/A,TO/A,COLSTART/K"
Examples :
SORT file TO sorted-file
SORT list TO sort-list COLSTART 5
sorts file 'list' to 'sort-list', based on the data
starting in column 5
TYPE types a file to the screen that you can
optionally specify as text or hex.
Format : TYPE [FROM] <name> [[TO <name>] [OPT NH]
Template : TYPE "FROM/A,TO,OPT/K"
Examples :
TYPE preferences OPT H
type a file in hex
TYPE :s/startup-sequence
CLI Control
BREAK sets attention flags in a given process.
Format : BREAK <task> [ALL] [C] [D] [E] [F]
Template : BREAK "TASK/A,ALL/S,C/S,D/S,E/S,F/S"
Examples :
BREAK 6
BREAK 4 D F
CD make a given directory and/or drive the current directory
Format : CD [<dir>]
Template : CD "DIR"
Examples :
CD RAM:
makes RAM: the current directory
CD DF1:temp/l
ENDCLI ends an interactive CLI process.
Format : ENDCLI
Template : ENDCLI
Examples :
ENDCLI
closes the CLI window
NEWCLI start a new CLI window
Format : NEWCLI [<window>]
Template : NEWCLI "WINDOW"
Examples :
NEWCLI
NEWCLI "CON:20/15/300/100/a new CLI"
opens a new window titled "a new CLI" at position
20,15, of size 300 x 100 pixels
PROMPT change the current CLI prompt
Format : PROMPT [<prompt>]
Template : PROMPT "NEWPROMPT"
Examples :
PROMPT
resets the prompt to ">"
PROMPT "%n> "
sets the prompt to "1> ", where 1 is the current
number
RUN executes commands as a background process.
Format : RUN <command>
Template : RUN command +
command
Examples :
RUN TYPE :s/startup-sequence
RUN COPY :c/list TO RAM: +
CD RAM: +
LIST
runs each command in sequence
STACK displays or sets the stack size for commands.
Format : STACK [<n>]
Template : STACK "SIZE"
Examples :
STACK
STACK 9000
STATUS displays information about the CLI processes
currently in existence.
Format : STATUS [<process>] [FULL] [TCB] [SEGS] [CLI ALL]
Template : STATUS "PROCESS,FULL/S,TCB/S,SEGS/S,CLI=ALL/S"
Examples :
STATUS
STATUS 1 FULL
WHY explains why a previous command failed.
Format : WHY
Template : WHY
Examples :
WHY
Command Sequence Control
ECHO displays the message specified
Format : ECHO < string >
Template : ECHO ""
Examples :
ECHO "This string was echoed to the screen"
EXECUTE executes a file of commands.
Format : EXECUTE <comandfile> [arguments]
Template : EXECUTE "command-file","args"
Examples :
EXECUTE :s/startup-sequence
EXECUTE my-command-file
FAILAT ends a command sequence if a program returns
an error code greater than or equal to this number.
Format : FAILAT <n>
Template : FAILAT "number"
Examples :
FAILAT
if the program returns any error code
FAILAT 14
IF tests specified actions within a command sequence.
Format : IF [NOT] [WARN] [ERROR] [FAIL] [<string> EQ <string>]
[EXISTS <name>]
Template : IF "NOT/S,WARN/S,ERROR/S,FAIL/S,,EQ/K,EXISTS/K"
Examples :
IF EXISTS :c/cd
IF ERROR
LAB defines a label ( see SKIP ).
Format : LAB <string>
Template : LAB <text>
Examples :
LAB error-location
LAB ok
QUIT exits from command sequence witha given error code.
Format : QUIT [<returncode>]
Template : QUIT "RC"
Examples :
QUIT 14
QUIT
SKIP jumps forward to a LAB in a command sequence ( see LAB ).
Format : SKIP <label>
Template : SKIP "LABEL"
Examples :
SKIP
SKIP error-location
WAIT waits for, or until, a specified time.
Format : WAIT <n> [SECSECS] [MINMINS] [UNTIL<time>]
Template : WAIT ",SEC=SECS/S,MIN=MINS/S,UNTIL/K"
Examples :
WAIT
WAIT UNTIL 12:25
System and Storage Management
ASSIGN assigns a logical device name to a file or directory
Format : ASSIGN [[<name>] <dir>] [LIST]
Template : ASSIGN "NAME,DIR,LIST/S"
Examples :
ASSIGN temp: DF0:source/files
ASSIGN cc: df1:/lc1
now you can say 'cc: cfile' to compile a C file
ASSIGN LIST
lists currently assigned device names
DATE displays or sets the system date and time.
Format : DATE [<date>] [<time>] [TOVER <name>]
Template : DATE "DATE,TIME,TO=VER/K"
Examples :
DATE today
DATE yesterday
DATE tomorrow
DATE friday
sets the date to the next friday after the current (wrong)
date
DATE 01-OCT-85 12:32
DISKCOPY copies the contents of one entire floppy disk to another.
Format : DISKCOPY [FROM] <disk> TO <disk> [NAME <name>]
Template : DISKCOPY "FROM/A,TO/A/K,NAME/K"
Examples :
DISKCOPY FROM DF0: TO DF1:
DISKCOPY DF0: TO DF0: NAME "Copied Disk"
names new disk "Copied Disk"
FAULT displays messages corresponding to supplied fault
or error codes.
Format : FAULT [<n>]
Template : FAULT ",,,,,,,,,,"
Examples :
FAULT 123
FAULT 133 234 245
FORMAT formats and initializes a new 3 1/2 inch floppy disk.
Format : FORMAT DRIVE <drivename> NAME <string>
Template : FORMAT "DRIVE/A/K,NAME/A/K"
Examples :
FORMAT DRIVE DF0: NAME "New Blank Disk"
INFO gives information about currently mounted disks
Format : INFO
Template : INFO
Examples :
INFO
INSTALL makes a formatted disk bootable.
Format : INSTALL [DRIVE] <drive>
Template : INSTALL "DRIVE/A"
Examples :
INSTALL DF0:
RELABEL changes the volume name of a disk.
Format : RELABEL [DRIVE] <drive> [NAME] <name>
Template : RELABEL "DRIVE/A,NAME/A"
Examples :
RELABEL DF1: "Disk over there"